<template>
  <div class="home">
    <router-view @hostflag="hostflag"></router-view>

    <van-tabbar v-model="active" route class="bommot">
      <van-tabbar-item icon="video-o" :to="flag?'/home/film/showing':'/home/film/coming'">电影</van-tabbar-item>
      <van-tabbar-item icon="tv-o" to="/home/cinema">影院</van-tabbar-item>
      <van-tabbar-item icon="comment-o" to="/home/info">咨询</van-tabbar-item>
      <van-tabbar-item icon="contact" to="/home/my">我的</van-tabbar-item>
    </van-tabbar>
  </div>
</template>
<script>
export default {
  props: [],
  data() {
    return {
      active: 0,
      flag: "true"
    };
  },
  computed: {},
  methods: {
    hostflag(val) {
      this.flag = val;
    }
  },
  components: {},
  filters: {},
  watch: {},
  created() {},
  beforeMount() {},
  mounted() {},
  beforeUpdate() {},
  updated() {},
  beforeDestroy() {},
  destroyed() {}
};
</script>
<style scoped>
html,
body,
.home {
  height: 100%;
}
.bommot {
  margin-top: 20px;
}
</style>